package ui.footer 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.text.TextField;
	import model.Model;
	import utils.TextFieldUtil;
	
	/**
	 * ...
	 * @author usual
	 */
	public class WebSiteTitle extends MovieClip 
	{
		private var _label:String;
		private var _textField:TextField
		public function WebSiteTitle(label:String="") 
		{
			_label = label;
			addEventListener(Event.ADDED_TO_STAGE, _build);
		}
		
		private function _build(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, _build);
			_addText();
		}
		
		private function _addText():void 
		{
			var lbl:String = Model.instance.getUiLabel(_label)
			_textField = new TextField();
			_textField.selectable = _textField.mouseEnabled = false;
			TextFieldUtil.setText(_textField, lbl, true);
			addChild(_textField);
		}
		
	}

}